﻿//-----------------------------------------------------------------------
// <copyright file="FontFamiliesProvider.cs" author="Artak Mkrtchyan">
//     Creative Commons - GNU General Public License (http://creativecommons.org/licenses/GPL/2.0/
// </copyright>
// <author>Artak Mkrtchyan</author>
// <email>mkArtak@gmail.com</email>
// <date>28/01/2013</date>
//-----------------------------------------------------------------------

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows.Media;

namespace ConsoleHoster.Common.Utilities
{
	public class FontFamiliesProvider : IFontFamiliesProvider
	{
		internal const string EXCLUDED_FONT_NAME = "extraglyphlets";

		public ReadOnlyCollection<FontFamily> GetAvailableFontFamilies()
		{
			IList<FontFamily> tmpFamilies = Fonts.SystemFontFamilies.Where(item => !item.Source.ToLower().Contains(EXCLUDED_FONT_NAME)).ToList();
			return new ReadOnlyCollection<FontFamily>(tmpFamilies);
		}
	}
}
